<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:f="http://xmlns.jcp.org/jsf/core"
      xmlns:p="http://primefaces.org/ui">

    <ui:composition>

        <p:dialog id="DetallehistorialEditDlg" widgetVar="DetallehistorialEditDialog" modal="true" resizable="false" appendTo="@(body)" header="#{bundle.EditDetallehistorialTitle}">
            <h:form id="DetallehistorialEditForm">
                <h:panelGroup id="display">
                    <p:panelGrid columns="2" rendered="#{detallehistorialController.selected != null}">
                        <p:outputLabel value="#{bundle.EditDetallehistorialLabel_iddetallehistorial}" for="iddetallehistorial" />
                        <p:inputText id="iddetallehistorial" value="#{detallehistorialController.selected.iddetallehistorial}" title="#{bundle.EditDetallehistorialTitle_iddetallehistorial}" required="true" requiredMessage="#{bundle.EditDetallehistorialRequiredMessage_iddetallehistorial}"/>
                        <p:outputLabel value="#{bundle.EditDetallehistorialLabel_valor}" for="valor" />
                        <p:inputText id="valor" value="#{detallehistorialController.selected.valor}" title="#{bundle.EditDetallehistorialTitle_valor}" />
                        <p:outputLabel value="#{bundle.EditDetallehistorialLabel_idcomponenteformula}" for="idcomponenteformula" />
                        <p:selectOneMenu id="idcomponenteformula" value="#{detallehistorialController.selected.idcomponenteformula}" >
                            <f:selectItem itemLabel="#{bundle.SelectOneMessage}"/>
                            <f:selectItems value="#{componenteformlaController.itemsAvailableSelectOne}"
                                           var="idcomponenteformulaItem"
                                           itemValue="#{idcomponenteformulaItem}"/>
                        </p:selectOneMenu>
                        <p:outputLabel value="#{bundle.EditDetallehistorialLabel_idhistorial}" for="idhistorial" />
                        <p:selectOneMenu id="idhistorial" value="#{detallehistorialController.selected.idhistorial}" >
                            <f:selectItem itemLabel="#{bundle.SelectOneMessage}"/>
                            <f:selectItems value="#{historialController.itemsAvailableSelectOne}"
                                           var="idhistorialItem"
                                           itemValue="#{idhistorialItem}"/>
                        </p:selectOneMenu>
                    </p:panelGrid>
                    <p:commandButton actionListener="#{detallehistorialController.update}" value="#{bundle.Save}" update="display,:DetallehistorialListForm:datalist,:growl" oncomplete="handleSubmit(args, 'DetallehistorialEditDialog');"/>
                    <p:commandButton value="#{bundle.Cancel}" onclick="DetallehistorialEditDialog.hide()"/>
                </h:panelGroup>
            </h:form>
        </p:dialog>

    </ui:composition>
</html>
